package com.rd.student.jike.class2.lihongming.week731_806.Day0803.Pet;

import java.util.Scanner;

/**
 * @Auther:Heinrich
 * @Date:2023/8/2-08-02-14:37
 * @Description:c230802
 * @version:1.0
 */
public class Test01 {
    public static void main(String[] args) {
        Animal cat = Store.getInstance();
        Lady zhang = new Lady("张女士",cat);
        Animal dog = Store.getInstance();
        Lady Wang = new Lady("王女士",dog);
        System.out.println(zhang.buy());
        System.out.println(Wang.buy());
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入您要查看的数量");
        int num = scanner.nextInt();
        System.out.println("请输入您要选择的宠物种类（如：猫，狗，猪）");
        Animal pet ;
        String type = scanner.next();
        switch (type){
            case "猫":
                pet = Store.getInstance("cat",num);
                Lady Li = new Lady("李女士",pet);
                System.out.println(Li.buy());
                break;
            case "狗":
                pet = Store.getInstance("dog",num);
                Li = new Lady("李女士",pet);
                System.out.println(Li.buy());
                break;
            case "猪":
                pet = Store.getInstance("pet",num);
                Li = new Lady("李女士",pet);
                System.out.println(Li.buy());
                break;
            default:
                System.out.println("本店没有这种宠物，去别人家看看吧！");

        }

    }
}
